package com.lvt.example.thinking.in.spring.questions.L24.resttemplate;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * desc：class
 *
 * @author LT
 * @date 2022/10/25
 */
@Controller
public class RestTemplateController {

    @RequestMapping(path = "hi", method = RequestMethod.POST)
    public String hi(@RequestParam("para1") String para1, @RequestParam("para2") String para2) {
        return "helloworld:" + para1 + "," + para2;
    }

    @RequestMapping(path = "hi2", method = RequestMethod.GET)
    public String hi2(@RequestParam("para1") String para1) {
        return "helloworld:" + para1;
    }

    @RequestMapping(path = "hi3", method = RequestMethod.GET)
    public String hi(@RequestParam("para1") String para1) {
        return "helloworld:" + para1;
    }

}
